import { NgModule } from '@angular/core';
import { HttpClient, HttpClientModule } from '@angular/common/http';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { IndexComponent } from './index/index';
import {IonicModule} from "ionic-angular";
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import {QuestionCheckboxPage} from "./question-checkbox/question-checkbox";
import {QuestionSelectPage} from "./question-select/question-select";
import {QuestionSinglePage} from "./question-single/question-single";
import {QuestionAreaPage} from "./question-area/question-area";
import {QuestionCommodityPage} from "./question-commodity/question-commodity";
import {QuestionCompletionPage} from "./question-completion/question-completion";
import {QuestionImagesPage} from "./question-images/question-images";
import {QuestionScorePage} from "./question-score/question-score";
import {QuestionSortPage} from "./question-sort/question-sort";
import {QuestionTimePage} from "./question-time/question-time";
import { MultiPickerModule } from 'ion-multi-picker';
import { QuestionTestCompletionPage } from "./question-test-completion/question-test-completion";
import { QuestionTestSinglePage } from "./question-test-single/question-test-single";
import { PhoneRecordPage } from './phone-record/phone-record';
import {QuestionTestCheckboxPage} from "./question-test-checkbox/question-test-checkbox";
import {QuestionSubjectivityPage} from "./question-subjectivity/question-subjectivity";
import {QuestionMatrixSinglePage} from "./question-matrix-single/question-matrix-single";
import {QuestionMatrixCheboxPage} from "./question-matrix-chebox/question-matrix-chebox";
import {QuestionMatrixSelectPage} from "./question-matrix-select/question-matrix-select";
import {QuestionMatrixTextPage} from "./question-matrix-text/question-matrix-text";
import {QuestionMatrixScorePage} from "./question-matrix-score/question-matrix-score";
import { QuestionMatrixSlidePage} from "./question-matrix-slide/question-matrix-slide";
import { QuestionMatrixProportionPage} from "./question-matrix-proportion/question-matrix-proportion";
import { QueationLinkagePage } from './queation-linkage/queation-linkage';
import { QuestionVotePage } from './question-vote/question-vote';
import { QuestionJobPage } from './question-job/question-job';
import { TipsPage } from './tips/tips';
import { QuestionMapPage } from './question-map/question-map';
import { DmtPage } from './dmt/dmt';


export function createTranslateLoader(http: HttpClient) {
  return new TranslateHttpLoader(http, './assets/i18n/', '.json');
}
@NgModule({
	declarations: [
    IndexComponent,
    QuestionCheckboxPage,
    QuestionSelectPage,
    QuestionSinglePage,
    QuestionAreaPage,
    QueationLinkagePage,
    QuestionCommodityPage,
    QuestionCompletionPage,
    QuestionImagesPage,
    QuestionScorePage,
    QuestionSortPage,
    QuestionVotePage,
    QuestionMapPage,
    QuestionJobPage,
    QuestionTimePage,
    QuestionTestCompletionPage,
    QuestionTestSinglePage,
    PhoneRecordPage,
    DmtPage,
    QuestionTestCheckboxPage,
    QuestionSubjectivityPage,
    QuestionMatrixSinglePage,
    QuestionMatrixCheboxPage,
    QuestionMatrixSelectPage,
    QuestionMatrixTextPage,
    QuestionMatrixScorePage,
    QuestionMatrixSlidePage,
    QuestionMatrixProportionPage,
    TipsPage,
                ],
	imports: [IonicModule,
    MultiPickerModule,
    TranslateModule.forRoot({
      loader: {
        provide: TranslateLoader,
        useFactory: (createTranslateLoader),
        deps: [HttpClient]
      }
    }),],
  entryComponents: [
    IndexComponent,
  ],
	exports: [
    IndexComponent,
    QuestionCheckboxPage,
    QuestionSelectPage,
    QuestionSinglePage,
    QuestionAreaPage,
    QueationLinkagePage,
    QuestionCommodityPage,
    QuestionCompletionPage,
    QuestionImagesPage,
    QuestionScorePage,
    QuestionSortPage,
    QuestionVotePage,
    DmtPage,
    QuestionMapPage,
    QuestionJobPage,
    QuestionTimePage,
    QuestionTestCompletionPage,
    QuestionTestSinglePage,
    PhoneRecordPage,
    QuestionTestCheckboxPage,
    QuestionSubjectivityPage,
    QuestionMatrixSinglePage,
    QuestionMatrixCheboxPage,
    QuestionMatrixSelectPage,
    QuestionMatrixTextPage,
    QuestionMatrixScorePage,
    QuestionMatrixSlidePage,
    QuestionMatrixProportionPage,
    TipsPage,
  ]
})
export class ComponentsModule {}
